package icbc.nav
{
	import icbc.app.AppText;
	import icbc.nav.entity.Menu;

	public class Session
	{
		private static var _instance:Session = null;
		
		public function Session(enforcer:SingletonEnforcer)
		{
			if (_instance != null) { throw new Error(AppText.ERROR_SINGLETON_INSTANCE); }
		}
		
		private var _menu:Menu = null;
		public function get menu():Menu { return _menu; }
		public function set menu(value:Menu):void
		{
			_menu = value;
		}
		
		public static function instance():Session
		{
			if(_instance == null){ _instance = new Session(new SingletonEnforcer()); }
			return _instance;
		}
	}
}

class SingletonEnforcer {}